package com.lywz.web.struts;

import org.springframework.beans.factory.annotation.Qualifier;

import com.lywz.biz.service.city.CityInfoService;
import com.lywz.biz.service.food.ClassicFoodService;
import com.lywz.biz.service.food.FoodService;
import com.lywz.biz.service.food.FoodTypeService;
import com.lywz.biz.service.food.RestaurantsService;
import com.lywz.biz.service.food.SpecialSnackService;
import com.lywz.biz.service.hotel.HotelService;
import com.lywz.biz.service.scenic.ScenicService;
import com.lywz.biz.service.test.ServiceTest;
import com.lywz.biz.service.test.UserService;
import com.lywz.core.bean.StaticAutoWire;
import com.lywz.core.fileUpload.FileUploadProcessor;
import com.lywz.core.web.struts.StrutsBase;

/**
 * 旅游网站的抽象Action
 * 
 * @author Lionel pang
 * 
 */
public abstract class GZAbstracterAction extends StrutsBase {

    private static final long serialVersionUID = 2287128945611888478L;

    // 服务层测试使用
    @StaticAutoWire
    @Qualifier("serviceTestImpl")
    protected static ServiceTest serviceTestImpl;

    //登陆service,测试使用
    @StaticAutoWire
    protected static UserService service;

    /**
     *显示城市基本信息
     * 
     * @author zhouxc may
     *@date 2010-4-26
     */
    @StaticAutoWire
    protected static CityInfoService cityInfoService;

    //特色菜肴
    @StaticAutoWire
    @Qualifier("foodService")
    protected static FoodService foodService;

    //TODO 测试用

    public static FoodService getFoodService() {
        return foodService;
    }


  //TODO 测试用

    public static void setFoodService(FoodService foodService) {
        GZAbstracterAction.foodService = foodService;
    }

    
    @StaticAutoWire
    @Qualifier("classicFoodService")
    public static ClassicFoodService classicFoodService;

    
    @StaticAutoWire
    @Qualifier("restaurantService")
    public static RestaurantsService restaurantService;
    
    @StaticAutoWire
    @Qualifier("foodTypeService")
    public static FoodTypeService foodTypeService;
    
    @StaticAutoWire
    @Qualifier("specialSnackService")
    public static SpecialSnackService specialSnackService;
    
    //景区Service
    
    @StaticAutoWire
    protected static ScenicService scenicService;
    
    // 默认文件上传核心
    @StaticAutoWire
    @Qualifier("defaultFileUpload")
    protected static FileUploadProcessor defaultFileUpload;
    
    //住宿Hotel
    @StaticAutoWire
    @Qualifier("hotelService")
    protected static HotelService hotelService;
    
    
    
    

    public static ScenicService getScenicService() {
        return scenicService;
    }
}
